<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'left.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script src="/js/jquery-1.11.0.min.js" type="text/javascript"></script>
  </head>
  <script type="text/javascript">
  		function insert(){
  			$.post("base/comp!insert");
  		}
  		
  		function graph(){
  			window.showModalDialog('/jsp/display.jsp','实时曲线图','dialogWidth=900;dialogHeight=500'); 
  		}
  </script>
  
  <body>
  	<form action="base/comp!findAllPc_info" method="post">
  	    <input type="submit" value="查询">
  	    <input type="button" onclick="insert()" value="插入数据">
  	    <input type="button" onclick="graph()" value="测试highchats">
  	    <hr><br>
  		<table>
  			<c:forEach items="${pc_infoList}" var="pc" varStatus="vst">
				<c:if test="${vst.count mod 6 eq 1}">
					<tr>
				</c:if>
				<td>
					<li><a href="base/comp!findPcById?pc_id=${pc.id}" target="rightFrame"><img src="/img/PC.jpg"/></a></li>
					<li>${pc.ip}</li>
				</td> 
				<c:if test="${vst.count mod 6 eq 0}">
					</tr>
				</c:if>			  	  	
  			</c:forEach>
  		</table>
  	</form>
  </body>
</html>
